﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Restaurant
{
    public partial class frmNVQLNhaHang : Form
    {
        public frmNVQLNhaHang()
        {
            InitializeComponent();
        }

        public User_Control.QLNhanVien qlnv = new User_Control.QLNhanVien();
        public User_Control.QLDoanhThu qldt = new User_Control.QLDoanhThu();
        public User_Control.QLBan qlb = new User_Control.QLBan();
        private int flag = 1;

        private void btnQLNhanVien_Click(object sender, EventArgs e)
        {
            if (flag == 1)
            {
                pn_QL.Controls.Add(qlnv);
                flag = 0; 
                return;
            }
            if (flag == 0)
            {
                pn_QL.Controls.Clear();
                flag = 1;
                return;
            }
        }

        private void frmNVQLNhaHang_Load(object sender, EventArgs e)
        {
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (flag == 1)
            {
                pn_QL.Controls.Add(qldt);
                flag = 0;
                return;
            }
            if (flag == 0)
            {
                pn_QL.Controls.Clear();
                flag = 1;
                return;
            }
        }

        private void btnQLBan_Click(object sender, EventArgs e)
        {
            if (flag == 1)
            {
                pn_QL.Controls.Add(qlb);
                flag = 0;
                return;
            }
            if (flag == 0)
            {
                pn_QL.Controls.Clear();
                flag = 1;
                return;
            }
        }

        private void pn_QL_Paint(object sender, PaintEventArgs e)
        {

        }
    }
}
